#include <iostream>
#include <string>
#include <cstring>
#include <signal.h>

//使用说明
void Usage(){
    std::cout << "Usage:\n\t" << "kill -signum pid\n" << std::endl;
}

int main(int argc, char* argv[]){
    Usage();//提醒用户
    
    if(argc != 4){
        Usage();
        exit(1);
    }

    if(strcmp(argv[1], "kill") != 0){
        Usage();
        exit(2);
    }

    int signum = std::stoi(argv[2]);//获取信号
    int pid = std::stoi(argv[3]);//获取进程pid

    int kill_ret = kill(pid, signum);

    return 0;
}